import React, { memo } from "react"
import type { ReactNode } from "react"
import { Link } from "react-router-dom"
import "./index.less"
interface Iprops {
	children?: ReactNode
	title: string
	moreTxt?: string
	moreLink?: string
}
const SectionHeaderV2: React.FC<Iprops> = (props) => {
	const { title, moreLink = "", moreTxt = "" } = props
	return (
		<div className="sectionHeaderV2Container">
			<div className="title">{title}</div>
			{moreLink && moreTxt && <Link to={moreLink}>{moreTxt}</Link>}
		</div>
	)
}

export default memo(SectionHeaderV2)
